#pragma once

#include "Sector.h"
#include "Definitions.h"
#include "Grid.h"

class Quad;
class FriendlyShip;

class Quadrant : public Grid
{
private:
	Sector sector[NUM_BOARD_PIECES];
	Quad* currentQuad;
	Unit* unit[MAX_UNITS];
	XY enemyPos[MAX_ENEMIES];
	int numEnemies;
	FriendlyShip* playerShip;
	XY cursor, playerPos, target;
private:
	void clearBoard();
	void spawnUnits(QuadInfo);
private:
	void fillGrid();
	void ShortRangeScan();
private:
	QuadrantClickAction action;
	void ReadyEnergyWeapon();
	void ReadyMissle(XY);
	void ReadyMovePath(XY);
	void ReadyDock(XY);
	void GreyPath(XY);
private:
	void FireEnergyWeapon();
	void FireMissile();
	void MoveShip();
	void DockShip();
public:
	Quadrant();
	~Quadrant();
	void Load(Quad*);
	void Update(MouseInfo);
};